package com.zhangtai.modules.service.employee;

import com.zhangtai.modules.entity.employee.EmployeeArchiveEntity;
import com.zhangtai.utils.PageResult;
import com.zhangtai.utils.R;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


/**
 * 
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2020-08-19 10:47:41
 */

public interface EmployeeArchiveService {

    @GetMapping("/findEmployeeArchiveList")
    @ApiOperation(value = "分页查询")
    PageResult<EmployeeArchiveEntity> queryPage(@RequestParam(value = "employeeOid", required = false) String employeeOid,
                                             @RequestParam(value = "name", required = false) String name,
                                             @RequestParam(value = "orgname", required = false) List<Long> orgname,
                                             @RequestParam(value = "unitname", required = false) List<Long> unitname,
                                             @RequestParam(value = "jobname", required = false) List<Long> jobname,
                                             @RequestParam(value = "status",required = false)List<Integer> status,
                                             @RequestParam(value = "isReinstate", required = false) Integer isReinstate,
                                             @RequestParam(value = "isEntryStatus", required = false) Integer isEntryStatus,
                                             @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                                             @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
                                             @RequestParam(value = "orgIds") List<Long> orgIds,
                                              @RequestParam(value = "socialTrainee", required = false) Integer socialTrainee
                                             , @RequestParam(value="hire_date",required = false) String hireDate,
                                             @RequestParam(value="isOffer",required = false)      Integer isOffer,
                                                @RequestParam(value="code",required = false) String code
    );

    @GetMapping("/infoEmployeeArchive")
    @ApiOperation(value = "根据id查找")
    EmployeeArchiveEntity getByIdE(@RequestParam("id") Long id);

    @PostMapping("/saveEmployeeArchive")
    @ApiOperation(value = "保存")
    R saveE(@RequestBody EmployeeArchiveEntity entity);

    @PostMapping("/updateEmployeeArchive")
    @ApiOperation(value = "修改")
    R updateByIdE(@RequestBody EmployeeArchiveEntity entity);

    @GetMapping("/deleteOneEmployeeArchive")
    @ApiOperation(value = "根据ID删除")
    R removeOneById(@RequestParam("id") Long id);

    @PostMapping("/deleteEmployeeArchives")
    @ApiOperation(value = "根据ID集合删除")
    R removeByIdsE(@RequestBody List<Long> ids);
}

